{layout name="layout" /}
<!-- Content -->
<section id="content" class="container">
	<!-- Breadcrumb -->
	{include file="public/breadcrumb"/}
	<h4 class="page-title b-0">权限菜单</h4>
	<div class="listview list-container">
		<header class="listview-header media">
			<ul class="list-inline pull-right m-t-5 m-b-0">
				<li>
					<a href="" title="Previous" class="tooltips">
							<i class="sa-list-back"></i>
					</a>
				</li>
				<li>
					<a href="" title="Next" class="tooltips">
						<i class="sa-list-forwad"></i>
					</a>
				</li>
			</ul>

			<ul class="list-inline list-mass-actions pull-left">
				<li>
					<a data-toggle="modal" href="{:url('back/rule/add')}" title="添加菜单" class="tooltips">
						<i class="sa-list-add"></i>
					</a>
				</li>

				<li class="show-on" style="display: none;">
					<a href="" title="Delete" class="tooltips">
						<i class="sa-list-delete"></i>
					</a>
				</li>
			</ul>

			<div class="clearfix"></div>
		</header>
		<div class="row">
			<div class="col-md-12">
				<div class="panel panel-default">

					<div class="panel-body">

						<div class="table-responsive">
							<table class="table">
								<tr>
									<th>ID</th>
									<th>模块</th>
									<th>栏目</th>
									<th>操作</th>
								</tr>
								{volist name="lists" id="lists"}
								<tr>
									<td>{$lists->id}</td>
									<td class="text-left">{$lists->name}</td>
									<td>{$lists->title}</td>
									<td>
										<a class="btn btn-xs btn-default" href="{:url('back/rule/edit',['id'=>$lists['id']])}">编辑</a>
										<a class="btn btn-xs btn-default delete" href="{:url('back/rule/delete',['id'=>$lists['id']])}">删除</a>
									</td>
								</tr>
								{volist name="$lists->parent" id="Rows"}
								<tr>
									<td>{$Rows->id}</td>
									<td class="text-left">┗━{$Rows->name}</td>
									<td>{$Rows->title}</td>

									<td>
										<a class="btn btn-xs btn-default" href="{:url('back/rule/edit',['id'=>$Rows['id']])}">编辑</a>
										<a class="btn btn-xs btn-default delete" href="{:url('back/rule/delete',['id'=>$Rows['id']])}">删除</a>

									</td>
								</tr>
								{volist name="$Rows->parent" id="Row"}
								<tr>
									<td>{$Row->id}</td>
									<td class="text-left">&nbsp;&nbsp;┗━━━{$Row->name}</td>
									<td>{$Row->title}</td>

									<td>
										<a class="btn btn-xs btn-default" href="{:url('back/rule/edit',['id'=>$Row['id']])}">编辑</a>
										<a class="btn btn-xs btn-default delete" href="{:url('back/rule/delete',['id'=>$Row['id']])}">删除</a>

									</td>
								</tr>
								{/volist} {/volist} {/volist}
							</table>
						</div>
					</div>
					<div class="media panel-footer text-center">
						{$pages}
					</div>

				</div>
			</div>
		</div>
	</div>
</section>